<!DOCTYPE html>
<html lang="en">
<link rel="stylesheet" th:href="@{/assets/css/colorbox.css}" />
<head th:include="fragments/head::header" />
<style>
    .error {
        color: #F00
    }
</style>
<body>
<!--<div th:include="fragments/top::top"></div>-->
<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <!--<div th:include="fragments/left::left" class="sidebar" id="sidebar"></div>-->
        <!--<div class="main-content">-->
            <!--<div class="breadcrumbs" id="breadcrumbs">-->
                <!--<ul class="breadcrumb">-->
                    <!--<li><i class="icon-home home-icon"></i> <a href="/main">首页</a></li>-->
                    <!--<li>学生管理</li>-->
                    <!--<li>综合部待审批信息</li>-->
                <!--</ul>-->
            <!--</div>-->
            <input type="hidden" name="type" id="type_input"/>
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <div class="row">
                            <div class="col-xs-12">
                                <h3 class="header smaller lighter blue">综合部待审批列表</h3>
                                <div class="table-header">
                                    <form class="form-inline">
                                        <div class="form-group">
                                            <label >学号：</label>
                                            <input type="text" id="studentNo" class="form-control input-sm" style="width:60px;" />
                                            <label >待审批类型:</label>
                                            <select type="" class="form-control input-sm" id="type" style="width:180px;">
                                                <!--<option value="0" >&#45;&#45;请选择待审批信息类型&#45;&#45;</option>-->
                                                <option value="1" selected="selected">签证申请</option>
                                                <option value="2" >签证结果</option>
                                                <option value="3" >结案信息</option>
                                            </select>
                                            <label >留学国家：</label>
                                            <select class="form-control input-sm" id="selectNationSearch"
                                                    style="width:150px;height:27px;margin:5px 0;"
                                                    data-placeholder="--请选择留学国家--">
                                                <option></option>
                                                <option th:each="country:${countryInfoList}" th:value="${country.id}"
                                                        th:text="${country.countryName}"></option>
                                            </select>
                                        </div>
                                        <!--<div class="form-group">-->
                                        <!--<label for="audit_status">认证状态：</label>-->
                                        <!--<select type="" class="form-control input-sm" id="audit_status" style="width:100px;">-->
                                        <!--<option value="" selected="selected">&#45;&#45;全部&#45;&#45;</option>-->
                                        <!--<option value="1" >认证已通过</option>-->
                                        <!--<option value="2" >认证未通过</option>-->
                                        <!--<option value="0" >待认证</option>-->
                                        <!--</select>-->
                                        <!--</div>-->
                                        <button type="button" id="query" class="btn btn-success ">查询</button>
                                        <button type="reset" class="btn btn-warning">清空</button>
                                        <!--<a data-toggle="modal" class="btn btn-info pull-right" href="javascript:void(0);" onclick="toAddURL();">添加权限</a>-->
                                    </form>
                                </div>

                                <div class="table-responsive">
                                    <div id="alert" class="alert alert-success" style="display: none;" role="alert">
                                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                        <span id="alertText"></span>
                                    </div>
                                    <table id="sample-table-2" class="table table-striped table-bordered table-hover">
                                        <thead>
                                        <tr>
                                            <!--<th class="hide">id</th>-->
                                            <th>学号</th>
                                            <th>姓名</th>
                                            <th>留学国家</th>
                                            <!--<th>创建日期</th>-->
                                            <th class="hidden-480">操作</th>
                                        </tr>
                                        </thead>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        <!--</div>-->
        <!--<div th:include="fragments/bottom::bottom"></div>-->
    </div>

    <a href="#" id="btn-scroll-up"
       class="btn-scroll-up btn btn-sm btn-inverse"> <i
            class="icon-double-angle-up icon-only bigger-110"></i>
    </a>
</div>
<!-- /.main-container -->

<!-- Modal备注 -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content"></div>
    </div>
</div>
<div th:include="fragments/js::js"></div>

<script th:src="@{/assets/js/jquery.validate.min.js}"></script>
<script th:src="@{/assets/js/jquery.validate.zh-CN.js}"></script>
<!-- page specific plugin scripts -->
<script th:src="@{/assets/js/jquery.dataTables.min.js}"></script>
<script th:src="@{/assets/js/jquery.dataTables.bootstrap.js}"></script>
<script th:src="@{/assets/js/temp.js}" charset="UTF-8"></script>
<script th:src="@{/business/student/GDUnAudit.js}" charset="UTF-8"></script>
<!--图片查看器-->
<script th:src="@{/assets/js/jquery.colorbox-min.js}"></script>
<script th:src="@{/layer/layer.js}"></script>
<script type="text/javascript">
    var oTable1;
//    var type = $("#type").find("option:selected").val();

    jQuery(function($) {
        oTable1 = $('#sample-table-2').dataTable({
            "bFilter" : false,//是否使用搜索
            "bProcessing" : true,
            "bDeferRender" : true,//
            "sPaginationType" : "bs_normal",//分页样式
            "bRetrieve" : true,//是否调用后台
            "bServerSide" : true,//是否以后台分页
            "bAutoWidth": true,
            "sAjaxSource" : "/GDUnAudit_query",//请求路径
            "fnServerData" : function(sSource, aoData, fnCallback) {
                aoData.push(
                    {name: "studentNo", value: $("#studentNo").val() == "" ? null : $.trim($("#studentNo").val())},
                    {name:"Type",value: $("#type").val()},
                    {name:"nationName",value: $("#selectNationSearch").find("option:selected").text()}
                )
                $.ajax({
                    "dataType" : 'json',
                    "type" : "GET",
                    "url" : sSource,
                    "data" : aoData,
                    "success" : fnCallback
                });
            },
            "aaSorting" : [ [ 1, "desc" ] ],
            "bSort":false,
            "aoColumns" : [
//                {"sClass": "center", "bVisible": false, "bSortable": false, "mData": "id"},
                {"sClass": "center", "bVisible": true, "bSortable": false, "mData":"studentNo"},
                {"sClass": "center", "bVisible": true, "bSortable": false, "mData": "studentName"},
                {"sClass": "center", "bVisible": true, "bSortable": false, "mData": "nationName"},
//                {"sClass": "center", "bVisible": true, "bSortable": false, "mData": "createdTime"},
                {"sClass" : "center", "bSortable" : false, "mData" : function (data) {
                    var styleDiv='<div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">';
                    var audit='<a class="blue" href="javascript:void(0);" onclick="toAudit(\''+data.studentNo+'\','+data.id+')">\n' +
                        '<i class="icon-zoom-in bigger-130"></i></a>\n' +
//                    var editOperation= '<a class="green" href="javascript:void(0);" onclick="toEditURL('+data.id+')">\n' +
//                        '<i class="icon-pencil bigger-130"></i></a>\n' ;
//                    var deleteOperation='<a class="red" href="javascript:void(0);"  onclick="toDeleteURL('+data.id+',this)">\n' +
//                        '<i class="icon-trash bigger-130"></i></a>\n' +
                        '</div>';
                    return styleDiv+audit;
                }}
            ],
            "oLanguage" : {
                "sLengthMenu" : "每页 _MENU_条 ",
                "sZeroRecords" : "对不起，查询不到任何相关数据",
                "sInfo" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录 ",
                "sInfoEmpty" : "显示 0 到 0 条，共 0 条记录",
                "sInfoFiltered" : "数据表中共为 _MAX_ 条记录)",
                "sProcessing" : "正在加载中...",
                "sSearch" : "搜索",
                "sUrl" : "", //多语言配置文件，可将oLanguage的设置放在一个txt文件中，例：Javascript/datatable/dtCH.txt
                "oPaginate" : {
                    "sFirst" : "第一页",
                    "sPrevious" : " 上一页 ",
                    "sNext" : " 下一页 ",
                    "sLast" : " 最后一页 "
                }
            }
            //多语言配置
        });
        $("#query").click(function() {
            oTable1.fnDraw();
        });

        $('#sidebar').collapse('hide')
    })



//    $("#type").change(function(){
//        $("#type_input").val($("#type").find("option:selected").val());
//    });



</script>
</body>
</html>